Skip to content

Conversation

@shajoezhu
Copy link
Contributor

What changes are proposed in this pull request?

  • Style this entry in a way that can be copied directly into NEWS.md. (#, @)

Provide more detail here as needed.

Reference GitHub issue associated with pull request. e.g., 'closes #'


Pre-review Checklist (if item does not apply, mark is as complete)

  • All GitHub Action workflows pass with a ✅
  • PR branch has pulled the most recent updates from master branch: usethis::pr_merge_main()
  • If a bug was fixed, a unit test was added.
  • Code coverage is suitable for any new functions/features (generally, 100% coverage for new code): devtools::test_coverage()
  • Request a reviewer

Reviewer Checklist (if item does not apply, mark is as complete)

  • If a bug was fixed, a unit test was added.
  • Run pkgdown::build_site(). Check the R console for errors, and review the rendered website.
  • Code coverage is suitable for any new functions/features: devtools::test_coverage()

When the branch is ready to be merged:

  • Update NEWS.md with the changes from this pull request under the heading "# cards (development version)". If there is an issue associated with the pull request, reference it in parentheses at the end update (see NEWS.md for examples).
  • All GitHub Action workflows pass with a ✅
  • Approve Pull Request
  • Merge the PR. Please use "Squash and merge" or "Rebase and merge".

@shajoezhu
Copy link
Contributor Author

shajoezhu commented Nov 28, 2025

try and use exisitng structure and surv functions, refactoring will be addressed in #142

@github-actions
Copy link
Contributor

github-actions bot commented Nov 28, 2025

Unit Tests Summary

  1 files   72 suites   1m 33s ⏱️
 72 tests  72 ✅ 0 💤 0 ❌
183 runs  183 ✅ 0 💤 0 ❌

Results for commit 899f0b9.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 28, 2025

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
gg_km 👶 $+0.02$ $+3$ $0$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
add_blank_rows 💔 $6.23$ $+1.05$ add_blank_rows_works
gg_km 👶 $+0.02$ df2gg_works_with_proper_x_axis_and_without
gg_km 👶 $+0.10$ gg_km_works_with_default_inputs

Results for commit 61160ab

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 28, 2025

badge

Code Coverage Summary

Filename                               Stmts    Miss  Cover    Missing
-----------------------------------  -------  ------  -------  ------------------------------------------------------------------------------------------------
R/add_blank_rows.R                        63       0  100.00%
R/add_difference_row.R                   101       0  100.00%
R/add_hierarchical_count_row.R            33       0  100.00%
R/annotate_gg_km.R                       137       9  93.43%   86-89, 108-112
R/crane-package.R                          2       2  0.00%    25-26
R/deprecated.R                             6       6  0.00%    15-21
R/get_cox_pairwise_df.R                   50      13  74.00%   68-71, 74-77, 82, 92-95
R/gg_km_utils.R                          102      16  84.31%   94, 134-151, 167
R/gg_km.R                                143      37  74.13%   54-57, 74, 101, 175-180, 183-186, 196-198, 203-204, 238-240, 247-250, 254, 265-269, 282, 284-286
R/label_roche.R                           72       0  100.00%
R/modify_header_rm_md.R                   18       2  88.89%   35-36
R/modify_zero_recode.R                    13       0  100.00%
R/tbl_baseline_chg.R                     186       0  100.00%
R/tbl_hierarchical_rate_and_count.R      148       0  100.00%
R/tbl_hierarchical_rate_by_grade.R       271       3  98.89%   162-164
R/tbl_listing.R                           35       0  100.00%
R/tbl_null_report.R                        9       0  100.00%
R/tbl_roche_summary.R                     64       0  100.00%
R/tbl_shift.R                            116       0  100.00%
R/tbl_survfit_quantiles.R                132       1  99.24%   295
R/tbl_survfit_times.R                     92       0  100.00%
R/theme_gtsummary_roche.R                 74       0  100.00%
R/utils.R                                 36       0  100.00%
TOTAL                                   1903      89  95.32%

Diff against main

Filename                   Stmts    Miss  Cover
-----------------------  -------  ------  -------
R/annotate_gg_km.R          +137      +9  +93.43%
R/get_cox_pairwise_df.R      +50     +13  +74.00%
R/gg_km_utils.R             +102     +16  +84.31%
R/gg_km.R                   +143     +37  +74.13%
TOTAL                       +432     +75  -3.73%

Results for commit: 899f0b9

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@shajoezhu
Copy link
Contributor Author

need examples and export
h_km_fit, h_tbl_coxph_pairwise,

@shajoezhu shajoezhu mentioned this pull request Nov 30, 2025
3 tasks
@shajoezhu
Copy link
Contributor Author

my styler is failing, @edelarua , i was wondering how you guys check style here https://github.com/insightsengineering/crane/actions/runs/19792793759/job/56708402248?pr=141

@shajoezhu
Copy link
Contributor Author

  • checking Rd cross-references ... WARNING
    Missing link(s) in Rd file 'annot_cox_ph.Rd':
    ‘control_coxph_annot’

Missing link(s) in Rd file 'annot_surv_med.Rd':
‘control_surv_med_annot’

Missing link(s) in Rd file 'h_tbl_coxph_pairwise.Rd':
‘control_coxph’

Missing link(s) in Rd file 's_coxph_pairwise.Rd':
‘control_coxph’

See section 'Cross-references' in the 'Writing R Extensions' manual.

  • checking for missing documentation entries ... WARNING
    Undocumented code objects:
    ‘obj_label’
    Undocumented S4 methods:
    generic 'obj_label' and siglist 'ANY'
    generic 'obj_label<-' and siglist 'ANY'
    All user-level objects in a package (including S4 classes and methods)
    should have documentation entries.
    See chapter ‘Writing R documentation files’ in the ‘Writing R
    Extensions’ manual.
  • checking for code/documentation mismatches ... OK
  • checking Rd \usage sections ... WARNING
    Undocumented arguments in Rd file 'obj_label-set.Rd'
    ‘obj’

Copy link
Contributor

@Melkiades Melkiades left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an issue with alignment that I still need to work on. It was already an issue in the first version of the template ;)

@shajoezhu
Copy link
Contributor Author

There is an issue with alignment that I still need to work on. It was already an issue in the first version of the template ;)

for the risk table? I think that is minor, we can either create an issue to fix this, or move to ggsurft in the refacorting

@shajoezhu shajoezhu requested a review from Melkiades December 10, 2025 03:47
@shajoezhu
Copy link
Contributor Author

hi @Melkiades , thanks for the changes, i think it looks great!

Copy link
Contributor

@Melkiades Melkiades left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is good to go. There are other updates to be done but minor changes

@Melkiades
Copy link
Contributor

@shajoezhu we could use add_* instead of annotate_*? might be clearer

@shajoezhu
Copy link
Contributor Author

@shajoezhu we could use add_* instead of annotate_*? might be clearer

honestly, i have no strong opinion on this

@Melkiades
Copy link
Contributor

@shajoezhu we could use add_* instead of annotate_*? might be clearer

honestly, i have no strong opinion on this

probably not because it would create confusion with ggsurvfit (add_risktable function for example)

@Melkiades
Copy link
Contributor

I think it is good to go @shajoezhu

@shajoezhu
Copy link
Contributor Author

hi @Melkiades , can you fix the cicd thanks!

@Melkiades
Copy link
Contributor

@shajoezhu do you know what is this?

✖ Failed to download gt 1.1.0 (aarch64-apple-darwin20)
✖ Failed to download xfun 0.54 (aarch64-apple-darwin20)

@shajoezhu
Copy link
Contributor Author

@shajoezhu do you know what is this?

✖ Failed to download gt 1.1.0 (aarch64-apple-darwin20) ✖ Failed to download xfun 0.54 (aarch64-apple-darwin20)

@Melkiades , where did you see these?

@shajoezhu shajoezhu enabled auto-merge (squash) December 18, 2025 03:26
@shajoezhu shajoezhu merged commit 81fda25 into main Dec 18, 2025
34 checks passed
@shajoezhu shajoezhu deleted the adding_g_km branch December 18, 2025 03:39
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants